package fauxman.BlinkyStates;

import java.awt.Point;

import fauxman.DynamicElements.Ghost;
import fauxman.model.WorldModel;
import fauxman.utilities.SpriteUtil;

public class ChaseBlinkyState extends BlinkyState {
	private static ChaseBlinkyState instance;
	
	private ChaseBlinkyState(){
	}
	
	public static ChaseBlinkyState getInstance(){
		if (instance==null)
			instance = new ChaseBlinkyState();
		return instance;
	}
	
	@Override
	public void setAppearance(int appearanceID, Ghost g) {
		g.setAppearance(SpriteUtil.getBlinkySprite(appearanceID));
	}

	public int[] getTarget(WorldModel model, Ghost g) {
		Point position = model.getFauxman().getDiscretePosition();
		int[] target =  {position.x, position.y};
		return target;
	}
}
